#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <iostream>
#include <cstring>
#include <string>
#include <fstream>
#include <streambuf>
#include <map>
#include <vector>
using namespace std;

extern "C" {
	int input(char* path, vector<string> &words) {
	ifstream inputFile(path);
	if(!inputFile.is_open()) {
		puts("input file does not exist"); 
		return -1;
	}
	string inputWords;
	inputWords.assign(istreambuf_iterator<char>(inputFile), 
				istreambuf_iterator<char>());
	inputWords += '\n';
	inputFile.close();
	string word("");
	for(unsigned int i = 0; i < inputWords.length(); i ++) {
		int ch = tolower(inputWords[i]);
        if(islower(ch)) {
        	word += ch;
		} else {
	        if(!word.empty()) {
	        	words.push_back(word);
				word.clear();
			}
		}
    }
    return 0;
}

void output(vector<string> result) {
	for(unsigned int i = 0; i < result.size(); i ++)
		cout << result[i].c_str() << endl;
}
}